package itdep.domain.student;

import itdep.domain.IisEntity;
import itdep.domain.education.Mark;
import itdep.domain.education.MarkSheet;

import javax.persistence.*;

/**
 * @author Ivan Khalopik
 * @version $Revision: 13 $ $Date: 2010-06-16 13:04:42 +0000 (Wed, 16 Jun 2010) $
 */
@Entity
@Table(name = "STUDENT_MARK")
public class StudentMark extends IisEntity {

	@ManyToOne(targetEntity = Student.class, fetch = FetchType.LAZY)
	@JoinColumn(name = "ID_STUDENT", nullable = false, insertable = true, updatable = true)
	private Student student;

	@ManyToOne(targetEntity = MarkSheet.class, fetch = FetchType.LAZY)
	@JoinColumn(name = "ID_MARK_SHEET", nullable = false, insertable = true, updatable = true)
	private MarkSheet markSheet;

	@ManyToOne(targetEntity = Mark.class, fetch = FetchType.LAZY)
	@JoinColumn(name = "ID_MARK", nullable = true, insertable = true, updatable = true)
	private Mark mark;


	public Student getStudent() {
		return student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	public MarkSheet getMarkSheet() {
		return markSheet;
	}

	public void setMarkSheet(MarkSheet markSheet) {
		this.markSheet = markSheet;
	}

	public Mark getMark() {
		return mark;
	}

	public void setMark(Mark mark) {
		this.mark = mark;
	}

}